-
Notifications
You must be signed in to change notification settings - Fork 33
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: avoid lost attestations and sync committee messages with early subnet subscribe #1298
Conversation
…tible roots in subnetinfo
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
@@ -41,8 +41,16 @@ defmodule LambdaEthereumConsensus.Validator.Duties do | |||
aggregation: [sync_committee_aggregator_duty()] | |||
} | |||
|
|||
@type subnets :: MapSet.t(Types.uint64()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: maybe add a comment on what a subnet is and what the uint is here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done!
Motivation
Some messages from sync committees and attestations weren't part of their aggregates due to late subscribes to the subnets, this PR address it
Description
This PR adds the subnets per slot to our shared duties and also adds a new key in the validator set struct to hold our last subnets subscribed to. On the first third of every slot, we check for the difference between the previous subnets and the new ones and do the appropriate unsubscribe/subscribe when needed. Apart from it this PR tackles an issue when receiving messages for non existing subnets crashed Libp2p.
Resolves #1300
Resolves #1301